package com.settlement.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.settlement.system.model.entity.*;
import com.settlement.system.model.query.AuditPageQuery;
import com.settlement.system.model.query.HistoryAuditQuery;
import com.settlement.system.model.vo.*;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 标准核销表 服务类
 * </p>
 *
 * @author huangrensen
 * @since 2023-08-05
 */
public interface SysAuditService extends IService<SysAudit> {

    Page<SysAudit> getAuditPage(AuditPageQuery queryParams);

    Page<SysAudit> pageAll(AuditPageQuery queryParams);

    AuditVo getAuditForm(String auditId);

    List<SysOrderVO> getOrderList(String linkNo);

    List<SysBillVO> getBillDetail(String linkNo);

    List<SysFileAudit> auditList(List<HistoryAuditQuery> historyAuditQueryList);

    boolean convert(SysOrder sysOrder, SysPlatform platform, SysStore sysStore);

    boolean convert(String linkNo, List<LocalDateTime> businessDateList, SysPlatform platform, SysStore sysStore, boolean needUpdateBusinessDate);

    List<SysAuditExportVO> listExportAudits(List<String> ids);

    List<SysAuditExportVO> listExportAudits(AuditPageQuery pageQuery);

    long getTotalPage(AuditPageQuery pageQuery);
    List<SysAuditExportVO> queryByPage(AuditPageQuery pageQuery);

    // 导入核销单，重新进入36条规则处理
    List<String> reload(List<SysAuditExportVO> vos);

    RulerCheckResult rulerCheck(List<SysAuditRule> ruleList, SysAudit sysAudit);

    boolean reBill(List<String> ids);

    int deleteByMonth(String month);

    List<SysOrderDetailVo> getOrderDetailList(String linkNo);
}
